//载入模块
 let fs = require("fs");
 
 let  user = { username:"admin1",password:"12345" };
 let txt = fs.readFileSync("person.json");
 let userinfo = JSON.parse(txt);
 let result = userinfo.find((value)=>{
	 return value.username == user.username && value.password == user.password;
 })
 if(result)
 {
	 console.log("登录成功");
 }
else
{
	console.log("用户和密码错误");
}